package org.pada.domain.config.consumer;

import java.lang.annotation.*;

/**
 * @author shen.peng
 * @since 2024/9/14
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RpcConsumer {

    /**
     * 域名
     * @return
     */
    String domain() default "";

    /**
     * 0: interface 请求方式
     *     path: /org.pada.flowex.client.rt.api.ProcessInstanceServiceI/submit
     *     body:
     *     {
     *         "processKey": "process_key_1"
     *     }
     *
     *
     * 1: rpc 请求方式
     *     path: /rpc
     *     body:
     *     {
     *          "service": "org.pada.flowex.client.rt.api.ProcessInstanceServiceI",
     *          "method": "submit",
     *          "body": {
     *               "processKey": "process_key_1"
     *          }
     *     }
     *
     * @return
     */
    int mode() default 0;
}
